package com.example.yucheng.service.impl;

import com.example.yucheng.domain.ReceivingUnit;
import com.example.yucheng.mapper.ReceivingUnitMapper;
import com.example.yucheng.service.ReceivingUnitService;
import com.example.yucheng.util.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReceivingUnitServiceImpl implements ReceivingUnitService {

    @Autowired
    ReceivingUnitMapper receivingUnitMapper;

    @Override
    public List<ReceivingUnit> getReceivingList() {
        return receivingUnitMapper.getReceivingList();
    }

    @Override
    public List<ReceivingUnit> getReceivingListByLimit(PageQuery pageQuery) {
        return receivingUnitMapper.getReceivingListByLimit(pageQuery);
    }

    @Override
    public boolean deleteReceivingPrice(int id) {
        return receivingUnitMapper.deleteReceivingPrice(id);
    }

    @Override
    public boolean updateReceivingPrice(ReceivingUnit receiving) {
        return receivingUnitMapper.updateReceivingPrice(receiving);
    }

    @Override
    public boolean insertReceivingPrice(ReceivingUnit receiving) {
        return receivingUnitMapper.insertReceivingPrice(receiving);
    }
}
